package com.edais.service.imp;

import java.util.Map;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

import com.edais.dao.WeixinBindingDao;
import com.edais.domain.AllAccessToken;
import com.edais.domain.Signature;
import com.edais.domain.WeixinMediaBinding;
import com.edais.service.WeixinBindingService;

@Service

public class WeixinBindingServiceImp implements WeixinBindingService{
	private static final Log logger=LogFactory.getLog(WeixinBindingServiceImp.class);
	
    @Autowired
    private WeixinBindingDao weixinBindingDao;

    /***
     * 新增媒介绑定
     */
	@Override
	public void insertIntoMediaBinding(WeixinMediaBinding mediaBinding) {
		// TODO Auto-generated method stub
		weixinBindingDao.insertIntoMediaBinding(mediaBinding);
	}

	@Override
	public int queryInfoMediaBinding(WeixinMediaBinding mediaBinding) {
		// TODO Auto-generated method stub
		return weixinBindingDao.queryInfoMediaBinding(mediaBinding);
	}

	@Override
	public Map<String, Object>  getSignature() {
		// TODO Auto-generated method stub
		return weixinBindingDao.getSignature();
	}

	@Override
	public void updateSignature(Map map) {
		// TODO Auto-generated method stub
		weixinBindingDao.updateSignature(map);
	}

	@Override
	public void insertSignature(Signature signTrue) {
		// TODO Auto-generated method stub
		weixinBindingDao.insertSignature(signTrue);
	}

	@Override
	public Map<String,String> getUseridByWeixinUid(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return weixinBindingDao.getUseridByWeixinUid(map);
	}
	
	@Override
	public Map<String,String> getWeixinUidBindingByMobile(Map<String, Object> map) {
		// TODO Auto-generated method stub
		return weixinBindingDao.getWeixinUidBindingByMobile(map);
	}
	@Override
	public Map<String, Object> getAllToken() {
		// TODO Auto-generated method stub
		return weixinBindingDao.getAllToken();
	}

	@Override
	public void insertAllToken(AllAccessToken aat) {
		// TODO Auto-generated method stub
		weixinBindingDao.insertAllToken(aat);
	}

	@Override
	public void updateAllToken(Map<String, String> paramsMap) {
		// TODO Auto-generated method stub
		weixinBindingDao.updateAllToken(paramsMap);
	}

	@Override
	public String queryMediaUid(WeixinMediaBinding mediaBinding) {
		// TODO Auto-generated method stub
		return weixinBindingDao.queryMediaUid(mediaBinding);
	}
	
}
